package com.nw.controller;

import com.nw.entity.Admin;
import com.nw.service.AdminService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;

@RestController
@RequestMapping("admin")
public class AdminController {
    @Resource
    AdminService adminService;
    @RequestMapping("login")
    public HashMap<String,Object> queryByUsername(Admin admin, String enCode){
        HashMap<String, Object> map = adminService.queryByUsername(admin, enCode);
        return map;
    }
}
